package com.yixun.qfbao.response.commission;

import java.util.ArrayList;
import java.util.List;

import org.springframework.util.CollectionUtils;

import com.yixun.qfbao.xf.model.dto.CustomerPremisesDto;

import lombok.Data;

/**
 * @author zilong.liu
 * @date 2020-9-11
 */
@Data
public class CommissionListResDto {

	private List<CommissionResDto> commissionListResDto;
	
	public void addCommissionListResDto(List<CustomerPremisesDto> customerPremisesDtos) {
		if(CollectionUtils.isEmpty(customerPremisesDtos)) {
			return;
		}
		if(commissionListResDto == null) {
			commissionListResDto = new ArrayList<>();
		}
		for (CustomerPremisesDto customerPremisesDto : customerPremisesDtos) {
			commissionListResDto.add(new CommissionResDto(customerPremisesDto));
		}
	}
	
}
